export function placeCaretAtEnd(jsDom) {
    //传入光标要去的jsDom节点
    jsDom.focus();
    if (
        typeof window.getSelection != "undefined" &&
        typeof document.createRange != "undefined"
    ) {
        var range = document.createRange();
        range.selectNodeContents(jsDom);
        range.collapse(false);
        var sel = window.getSelection();
        sel.removeAllRanges();
        sel.addRange(range);
    } else if (typeof document.body.createTextRange != "undefined") {
        var textRange = document.body.createTextRange();
        textRange.moveToElementText(jsDom);
        textRange.collapse(false);
        textRange.select();
    }
}